<script setup lang="ts">
import { useRouter } from "vue-router";
import { HOME_ROUTE_NAME } from "@/router/routes/home.route.ts";

const router = useRouter();

function handleBack() {
    window.history.back();
}
function handleToHome() {
    router.push({ name: HOME_ROUTE_NAME });
}
</script>

<template>
    <div class="h-full flex flex-col justify-center">
        <n-result status="404" title="404 Not Found" description="页面跑哪里去了？不不不，你可能走错路了。">
            <template #footer>
                <div class="space-x-2">
                    <n-button @click="handleBack">返回上一页</n-button>
                    <n-button @click="handleToHome" type="primary">回到首页</n-button>
                </div>
            </template>
        </n-result>
    </div>
</template>

<style scoped>

</style>